<%_
const _properties = locals.properties || [];
if (importProperty && baseModel) {
-%>
import {model, property, <%- baseModel %>} from '@loopback/repository';
<%_
} else if (importProperty) {
-%>
import {model, property} from '@loopback/repository';
<%_
} else {
-%>
import {model} from '@loopback/repository';
<%_
}

imports.forEach(i => {
-%>
<%- i %>
<%_
});
-%>

/**
 * The model class is generated from OpenAPI schema - <%- name %>
 * <%- escapeComment(description) %>
 */
@model({name: '<%- name %>'})
<%_ if (baseModel) { -%>
export class <%- className %> extends <%- baseModel %> {
  constructor(data?: Partial<<%- className %>>) {
    super(data);
  }

<%_ } else { -%>
export class <%- className %> {
  constructor(data?: Partial<<%- className %>>) {
    if (data != null && typeof data === 'object') {
      Object.assign(this, data);
    }
  }

<%_ } -%>
  <%_ for (const p of _properties) { -%>
  /**
  <%_ const _comment = escapeComment(p.description);
    if (_comment) {
  -%>
   * <%- _comment %>
  <%_ } else { -%>
   *
  <%_ } -%>
   */
<%_ if (p.comment) { -%>
  // <%- p.comment %>
<%_ } -%>
<%_ if (p.decoration) { -%>
  <%- p.decoration %>
<%_ } -%>
  <%- p.signature %>

  <%_ } -%>
}

export interface <%- className %>Relations {
  // describe navigational properties here
}

export type <%- className %>WithRelations = <%- className %> & <%- className %>Relations;


